package com.config;


import com.bean.BeanOne;
import com.bean.BeanTwo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class CommonConfig {
    @Bean
    public BeanOne beanOne() { // 外部bean注入,获取时可通过方法名获取bean
        return new BeanOne();
    }
    @Bean("abc")
    public BeanTwo beanTwo() {
        return new BeanTwo();
    }
}
